package com.zmx.patients.view.activity;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.RelativeLayout;

import com.zmx.patients.BaseActivity;
import com.zmx.patients.R;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;


public class CircleActivity extends BaseActivity {


    @BindView(R.id.layout)
    RelativeLayout layout;
    @BindView(R.id.layout1)
    RelativeLayout layout1;

    private String logo;

    @Override
    protected int getLayoutId() {
        return R.layout.activity_circle;
    }

    @Override
    protected void initViews() {

        ButterKnife.bind(this);
        setToolbar(R.id.tool_bar);
        logo = this.getIntent().getStringExtra("logo");

        if (logo.equals("a")) {
            layout1.setVisibility(View.GONE);
        } else {
            layout.setVisibility(View.GONE);
        }


    }

    @OnClick({R.id.layout, R.id.layout1})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.layout:

                Intent intent = new Intent(mActivity, CircleDetailsActivity.class);
                intent.putExtra("logo", "a");
                startActivity(intent);

                break;
            case R.id.layout1:

                Intent intent1 = new Intent(mActivity, CircleDetailsActivity.class);
                intent1.putExtra("logo", "b");
                startActivity(intent1);
                break;
        }
    }
}

